#include <glib.h>
#include <glib/gstdio.h>
#include <gst/gst.h>

#include "TXSDKCommonDef.h"
#include "TXDeviceSDK.h"

#define VERSION "0.1.2"
#ifdef MT_DEBUG
#define mt_dbg(fmt, args...) g_print(fmt, ##args)
#else
#define mt_dbg(fmt, args...)
#endif

struct FrameInfo {
    gint ngop;
    gint nframe;
    gint ntotal;
    gint quant;
    GstClockTime bts;
};

#define AMR_BUF_SIZE    32
#define AMR_PKG_MAX     8 

struct AudioInfo {
    tx_audio_encode_param param;
    enum audio_direction {
        AUDIO_SEND_TO_QQ,
        AUDIO_RECV_FROM_QQ,
    } dir;
    guint8 *dbuf;
    guint8 *qbuf;
    enum audio_dqbuffer {
        AUDIOC_DBUF,
        AUDIOC_QBUF,
    }dq;
    GMutex dqmutex;
    guint8 *pos;
    guint maxbuf;
    guint cnt;
};
